<%@ page import="gz.gae.blog.cache.CacheUtil" %>
<%@ page import="javax.cache.Cache" %>
<%@ page import="javax.cache.CacheStatistics" %>
<%@ page import="java.util.Set" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/jsp/_taglibs.jsp" %>
<%
  Cache cache = CacheUtil.getCache();
  CacheStatistics cacheStatistics = cache.getCacheStatistics();
  int count = cacheStatistics.getObjectCount();
%>
<table>
  <tr>
    <td>count:</td>
    <td><%=cacheStatistics.getObjectCount()%>
    </td>
  </tr>
  <tr>
    <td>Hits:</td>
    <td><%=cacheStatistics.getCacheHits()%>
    </td>
  </tr>
  <tr>
    <td>Misses:</td>
    <td><%=cacheStatistics.getCacheMisses()%>
    </td>
  </tr>
</table>
<c:if test="${param.cmd eq 'clearAll'}">
  <%
    cache.clear();
    response.sendRedirect("cache.jsp");
  %>
</c:if>
<a href="cache.jsp?cmd=clearAll">Clear All</a>

